<?php
require_once FRAMEWORK_DIR."/libraries/neocasta/database/database.php";
require_once FRAMEWORK_DIR."/libraries/neocasta/database/table.php";

class DatabaseTestCaseOutput extends UnitTestCase {


function testFirst() {
/*
	 $db = & NDatabase::getInstance(array('hostname'=>'localhost','user_name'=>'root','user_password'=>'','db_name'=>"test_core"));

	 $TestTable =  new NTable("#__test_table","id",&$db);
	 $TestTable->name="test name";
	 $TestTable->description="test_description";
	 $TestTable->store();
	 $this->assertTrue($TestTable->get("name"),"test name");	 
	 $last_test_id = $db->get_insert_id();
	 unset($TestTable);
	 $TestTable  =  new NTable("#__test_table","id",&$db);
	 $this->assertFalse($TestTable->get("name"),"test name");	 
	 $TestTable->name="test name_update";	
	 $db->setQuery( $sql="select * from #__test_table where `id`=".$last_test_id);
	 $this->assertTrue($db->_sql,"select * from test_table where `id`=".$last_test_id);
	 $oTest = $db->loadObject();
         
	 $this->assertTrue($oTest->name,"test name");	 
	 $TestTable->bind($oTest);
	 $this->assertTrue($TestTable->get("name"),"test name update");
	 $TestTable->store();
	 unset($TestTable);
	
 	$sql="select * from #_test_table where `id`=".$last_test_id;
	$oTest = $db->loadObject();

	 $this->assertTrue($oTest->name,"test name_update");

	*/ 
	 
        }
 
}


?>